<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>RaftLib: shm.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">RaftLib
   &#160;<span id="projectnumber">0.3a</span>
   </div>
   <div id="projectbrief">C++ Stream Processing Template Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_a524f484fa533a2a6c239765c656f82d.html">fifo</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">shm.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#ifndef _SHM_HPP_</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#define _SHM_HPP_  1</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;exception&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="classbad__shm__alloc.html">   13</a></span>&#160;<span class="keyword">class </span><a class="code" href="classbad__shm__alloc.html">bad_shm_alloc</a> : <span class="keyword">public</span> std::exception</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;{</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;   <a class="code" href="classbad__shm__alloc.html#a99a0af63093ee42b887c7cba382fdebd">bad_shm_alloc</a>( <span class="keyword">const</span> std::string message );</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;   </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* what() <span class="keyword">const</span> noexcept;</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;   <span class="keyword">const</span> std::string message;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;};</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="class_s_h_m.html">   25</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_s_h_m.html">SHM</a>{</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_s_h_m.html#ab5619833b87eb94c07b062973453be08">GenKey</a>(<span class="keywordtype">char</span> *buffer, <span class="keywordtype">size_t</span> length);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;   <span class="keyword">static</span> <span class="keywordtype">void</span>*   <a class="code" href="class_s_h_m.html#a4002055ba87b575dc710fdcb9f2d6103">Init</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *key, </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                        <span class="keywordtype">size_t</span> nbytes,</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                        <span class="keywordtype">bool</span>   zero = <span class="keyword">true</span>,</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                        <span class="keywordtype">void</span>   *ptr = <span class="keyword">nullptr</span> );</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;   <span class="keyword">static</span> <span class="keywordtype">void</span>*   <a class="code" href="class_s_h_m.html#a29c050546607549c46a5f5e30e88c03f">Open</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *key );</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;   <span class="keyword">static</span> <span class="keywordtype">bool</span>    <a class="code" href="class_s_h_m.html#a4c9d70e7a7a8cfdfb9d052a7f8842747">Close</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *key, </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                         <span class="keywordtype">void</span> *ptr,</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                         <span class="keywordtype">size_t</span> nbytes,</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                         <span class="keywordtype">bool</span>   zero = <span class="keyword">false</span> ,</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                         <span class="keywordtype">bool</span>   unlink = <span class="keyword">false</span> );</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;   <a class="code" href="class_s_h_m.html">SHM</a>();</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;   ~<a class="code" href="class_s_h_m.html">SHM</a>();</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;};</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* END _SHM_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="class_s_h_m_html_a29c050546607549c46a5f5e30e88c03f"><div class="ttname"><a href="class_s_h_m.html#a29c050546607549c46a5f5e30e88c03f">SHM::Open</a></div><div class="ttdeci">static void * Open(const char *key)</div><div class="ttdef"><b>Definition:</b> shm.cpp:140</div></div>
<div class="ttc" id="class_s_h_m_html_a4c9d70e7a7a8cfdfb9d052a7f8842747"><div class="ttname"><a href="class_s_h_m.html#a4c9d70e7a7a8cfdfb9d052a7f8842747">SHM::Close</a></div><div class="ttdeci">static bool Close(const char *key, void *ptr, size_t nbytes, bool zero=false, bool unlink=false)</div><div class="ttdef"><b>Definition:</b> shm.cpp:198</div></div>
<div class="ttc" id="class_s_h_m_html"><div class="ttname"><a href="class_s_h_m.html">SHM</a></div><div class="ttdef"><b>Definition:</b> shm.hpp:25</div></div>
<div class="ttc" id="classbad__shm__alloc_html_a99a0af63093ee42b887c7cba382fdebd"><div class="ttname"><a href="classbad__shm__alloc.html#a99a0af63093ee42b887c7cba382fdebd">bad_shm_alloc::bad_shm_alloc</a></div><div class="ttdeci">bad_shm_alloc(const std::string message)</div><div class="ttdef"><b>Definition:</b> shm.cpp:26</div></div>
<div class="ttc" id="class_s_h_m_html_ab5619833b87eb94c07b062973453be08"><div class="ttname"><a href="class_s_h_m.html#ab5619833b87eb94c07b062973453be08">SHM::GenKey</a></div><div class="ttdeci">static void GenKey(char *buffer, size_t length)</div><div class="ttdef"><b>Definition:</b> shm.cpp:39</div></div>
<div class="ttc" id="class_s_h_m_html_a4002055ba87b575dc710fdcb9f2d6103"><div class="ttname"><a href="class_s_h_m.html#a4002055ba87b575dc710fdcb9f2d6103">SHM::Init</a></div><div class="ttdeci">static void * Init(const char *key, size_t nbytes, bool zero=true, void *ptr=nullptr)</div><div class="ttdef"><b>Definition:</b> shm.cpp:63</div></div>
<div class="ttc" id="classbad__shm__alloc_html"><div class="ttname"><a href="classbad__shm__alloc.html">bad_shm_alloc</a></div><div class="ttdef"><b>Definition:</b> shm.hpp:13</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Oct 12 2015 12:16:50 for RaftLib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
